<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <title></title>
        <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
              crossorigin="anonymous">
    </head>
    <body>
        <div class="row">
            <form id="myFormId" action="comment.php" method="post"><br>
                Name: <input type="text" name="name" value="default"/> <br>
                hobby: <input type="text" name="hobby" value=""/> <br>
                Comment: <textarea name="comment"></textarea> <br>
                hidden: <input type="text" id="hiden" value="hiddenValue" hidden/>
                <input type="submit" value="Submit Comment">
            </form>
        </div>
        <div>
            <button type="button" onclick="myreset()">重置表单</button>
            <br/>
            <button type="button" onclick="myclear()">clear表单</button>
        </div>

    </body>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <script src="../static/jquery.form.min.js"></script>
    <script type="text/javascript">
        $(function () {
            console.log(new Date())
        })

        function myreset() {
            $('#myFormId').resetForm();
        }

        function myclear() {
            console.log($('#hiden').val())
            $('#myFormId').clearForm();
            console.log($('#hiden').val())
        }
    </script>
</html>
